<template>
  <div id="app">
    <router-view/>
    <theme-picker/>
  </div>
</template>
<script>
import ThemePicker from "@/components/ThemePicker";

export default {
  name: "App",
  components: {ThemePicker},
  metaInfo() {
    return {
      title: '小黑子仓库管理系统',
      /*      titleTemplate: title => {
              return title ? `${title} - ${process.env.VUE_APP_TITLE}` : process.env.VUE_APP_TITLE
           }*/
    }
  },

  created() {
  },
  mounted() {
    this.setTitleIcon()
  },

  methods: {
    setTitleIcon() {
      var link = document.querySelector("link[rel*='icon']") || document.createElement('link');
      link.type = 'image/x-icon';
      link.rel = 'shortcut icon';
      link.href = 'https://sky-out-cxg.oss-cn-beijing.aliyuncs.com/img_1.png'; // 图片放public目录
      document.getElementsByTagName('head')[0].appendChild(link);
      document.getElementsByTagName("title")[0].innerText = '小黑子管理系统';
    }
  }
};

</script>
<style scoped>
#app .theme-picker {
  display: none;
}
</style>
